<!DOCTYPE html>
<html lang="{$config.language}">
    <head>
        {include file="common/meta" /}
    </head>
    <body class="hold-transition skin-blue sidebar-mini fixed" id="tabs">
        <div class="wrapper">

            <header id="header" class="main-header">
                {include file='common/header' /}
            </header>
            <!-- Left side column. contains the logo and sidebar -->
            <aside class="main-sidebar">
                {include file='common/menu' /}
            </aside>

            <!-- Content Wrapper. Contains page content -->
            <div class="content-wrapper tab-content tab-addtabs">

            </div>
            <!-- /.content-wrapper -->
            <footer class="main-footer" style="display: none;">
                <div class="pull-right hidden-xs col-xs-6 col-md-3">
                    <div class="input-group">
                        <input type="text" id="phone_num" name="phone_num" class="form-control text-center" placeholder="电话号码" value="" disabled autocomplete="off" data-toggle="tooltip" title="如需将客户来电转接至您的手机，请按如下操作：输入*57*您的手机号码#，然后呼叫">
                        <span class="input-group-btn">
                        <button type="button" name="search" id="phone_call_btn" class="btn btn-flat btn-default" disabled><i class="fa fa-phone"></i>
                        </button>
                        </span>
                        <div class="menuresult list-group sidebar-form hide" style="width: 210px;">
                        </div>
                    </div>
                </div>
                <div class="pull-right hidden-xs col-xs-1 col-md-1" style="line-height: 33px; text-align: right;">
                    <!--<a id="a_test" href="javascript:a_test();">test</a>-->
                    <a id="phone_status" href="javascript:SIPClient.mute()"><!--<i class="fa fa-microphone"></i> <span>00:01</span>--></a>
                </div>
                <script type="text/javascript">
                    var extension_cfg = {
                        'ws_server' : '{$extension.ws_server}',
                        'sip_server' : '{$extension.sip_server}',
                        'sip_port' : '{$extension.sip_port}',
                        'sip_domain' : '{$extension.sip_domain}',
                        'sip_register_expires' : '{$extension.sip_register_expires}',
                        'sip_trace' : {$extension.sip_trace},
                        'extension' : '{$extension.extension}',
                        'extension_password' : '{$extension.extension_password}',
                    };
                    //console.log(extension_cfg);
                    localStorage.setItem("setsip",JSON.stringify(extension_cfg));
                    function a_test() {
                        //e.stopPropagation();
                        //e.preventDefault();
                        //alert('ok!');
                        var layer_index = Layer.confirm('来电号码：<h2 class="text-center">051250666636</h2>　　线路：<span class="label label-primary">051257652577</span><br/>　　被叫：8000', {closeBtn: 1, title: __('新来电') /*+ ' - ' + '051250666636'*/, btn: ['接 听','拒 绝'], cancel: function() { alert('decline'); }}, function(){ alert('accpet'); }, function(){ alert('decline'); });
                        //alert(layer_index);
                        Layer.close(layer_index)
                        return false;
                    }
                </script>
                <!--<strong>Copyright &copy; 2017-2018 <a href="https://www.fastadmin.net">Fastadmin</a>.</strong> All rights
                reserved.-->
                <div class="row">
                    <div class="col-xs-6 col-md-3" style="width: 230px;">
                        <div class="input-group">
                            <div id="agent_status" class="input-group-btn dropup">
                                <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><i class="fa fa-minus-square"></i> <span class="status-text">示忙</span>
                                <span class="fa fa-caret-up"></span></button>
                                <ul class="dropdown-menu">
                                    <li><a href="javascript:;"><i class="fa fa-circle"></i>示闲</a></li>
                                    <li><a href="javascript:;"><i class="fa fa-minus-square"></i>示忙</a></li>
                                </ul>
                            </div>
                            <!-- /btn-group -->
                            <input type="text" class="form-control text-center" value="分机 {$extension.extension}" readonly="readonly">
                        </div>
                    </div>
                    <div class="col-xs-6 col-md-3">
                        <div class="input-group">
                            <div class="input-group-btn">
                                <button type="button" class="btn btn-primary">落地线路</button>
                            </div>
                            <!-- /btn-group -->
                            <input type="text" class="form-control" value="{$extension.gateways}" readonly="readonly">
                        </div>
                    </div>
                </div>
            </footer>

            <!-- Add the sidebar's background. This div must be placed
                 immediately after the control sidebar -->
            <div class="control-sidebar-bg"></div>
            {include file="common/control" /}
        </div>
        <span class="status hide">{$auth->check('sound/status')}</span>
        <!-- ./wrapper -->
        <!-- end main content -->
        {include file="common/script" /}
    </body>
</html>
